package gui;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.joda.time.Duration;
import org.joda.time.LocalDate;
import org.joda.time.LocalTime;

import com.thirdnf.ResourceScheduler.Availability;
import com.thirdnf.ResourceScheduler.Resource;

/**
 * Represente les differentes ressources pour un emploi du temps
 * @author Stanislas KOBAK / Celine BARILLERE
 *
 */
public class Day implements Resource
{
	private final String title;

    private Day(String title)
    {
        this.title = title;
    }
    
    public static Day Monday()
    {
    	return new Day("Lundi");
    }
    
    public static Day Tuesday()
    {
    	return new Day("Mardi");
    }
    
    public static Day Wednesday()
    {
    	return new Day("Mercredi");
    }
    
    public static Day Thursday()
    {
    	return new Day("Jeudi");
    }
    
    public static Day Friday()
    {
    	return new Day("Vendredi");
    }
    
    public static Day Saturday()
    {
    	return new Day("Samedi");
    }
    
    public static Day Sunday()
    {
    	return new Day("Dimanche");
    }
    
    public static Day Daily()
    {
    	return new Day("Journee");
    }
    
    @Override
    public String getTitle()
    {
        return title;
    }
    
    @Override
    public Iterator<Availability> getAvailability(LocalDate localDate)
    {
        List<Availability> availabilities = new ArrayList<Availability>();
        availabilities.add(new Availability(new LocalTime(8,0,0), Duration.standardHours(12)));
        return availabilities.iterator();
    }
}
